<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
  </style>
</head>
<body>
  <div id="app">
    <ul>
      <li v-for="(item,i) in list" :key="item">
        {{item}}
        <button @click = "moveUp(i)" :disabled="i == 0"> ⬆ </button>
        <button @click = 'moveDown(i)':disabled="i == list.length - 1"> ⬇ </button>
      </li>
    </ul>
  </div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
  new Vue({
    el:'#app',
    data() {
      return {
        list:[
          'user1',
          'user2',
          'user3',
          'user4',
        ]
      }
    },
    methods:{   
      moveUp(i){
        let pre = this.list[i -1]
        this.$set(this.list,i-1,this.list[i])
        this.$set(this.list,i,pre)
      },
      moveDown(i){
        let next = this.list[i + 1]
        this.$set(this.list,i+1,this.list[i])
        this.$set(this.list,i,next)
      }
    }
  })
</script>
</html>